<script setup lang="ts">
import { http } from '@/utils/http'
import CustomNavbar from '@/pages/index/components/CustomNavbar.vue'
import { onMounted, reactive, ref } from 'vue';
import type { BannerItem } from '@/pages/types/home'
import { onLoad } from '@dcloudio/uni-app'
let dataList = ref<BannerItem[]>([])
const getData = async () => {
  const res = await http<BannerItem[]>({
    method: 'GET',
    url: '/home/banner',
  })
  dataList.value = res.result
  console.log(dataList);
}
onLoad(async () => {
  ;
  getData()
})
</script>

<template>
  <view>
    <CustomNavbar></CustomNavbar>
    <XtxSwiper :list=dataList></XtxSwiper>
    <view class="index">index</view>
  </view>
</template>

<style lang="scss">
//
</style>
